home *** CD-ROM | disk | FTP | other *** search
/ Macwelt 1 / Macwelt DVD 1.toast / Web-Publishing / HTML-Editoren / CreativePage 2.9 / CreativePage User Guides / CreativePage AppleScript Guide next >
Encoding:
Text File  |  2001-04-22  |  5.5 KB  |  193 lines

  1. <HTML>
  2. <HEAD>
  3.    <TITLE>CreativepageAppleScript Guide</TITLE>
  4.    <X-CLARIS-WINDOW TOP=150 BOTTOM=600 LEFT=226 RIGHT=708>
  5.    <X-CLARIS-TAGVIEW MODE=minimal>
  6. </HEAD>
  7. <BODY BGCOLOR="#E6E6E6">
  8. <P><FONT SIZE="+2" FACE="Arial"><B><I>CreativePage AppleScript
  9. Guide</I></B></FONT></P>
  10.  
  11. <P><FONT FACE="Arial Black" COLOR="#003300">ABOUT THIS GUIDE<BR>
  12. </FONT>This user guide is to teach you how to use AppleScript
  13. technology to control CreativePage. This guide will discuss how to
  14. make AppleScript's, what you can do with them and how to use them. If
  15. you have any questions please visit the <A HREF="#bottom">bottom of
  16. the user guide</A> for contact information.</P>
  17.  
  18. <P>Below is a list of AppleScript commands and their definition of
  19. what they do.</P>
  20.  
  21. <P><TABLE BORDER=0 WIDTH=450>
  22.    <TR BGCOLOR="#CCCCCC">
  23.       <TD WIDTH=94>
  24.          <P><B>Command</B></P>
  25.       </TD>
  26.       <TD>
  27.          <P><B>Definition</B></P>
  28.       </TD>
  29.    </TR>
  30.    <TR>
  31.       <TD WIDTH=94>
  32.          <P>Beep</P>
  33.       </TD>
  34.       <TD>
  35.          <P>Makes CreativePage beep</P>
  36.       </TD>
  37.    </TR>
  38.    <TR>
  39.       <TD WIDTH=94>
  40.          <P>Open File</P>
  41.       </TD>
  42.       <TD>
  43.          <P>Opens a file in CreativePage</P>
  44.       </TD>
  45.    </TR>
  46.    <TR>
  47.       <TD WIDTH=94>
  48.          <P>Quit</P>
  49.       </TD>
  50.       <TD>
  51.          <P>Quits CreativePage</P>
  52.       </TD>
  53.    </TR>
  54.    <TR>
  55.       <TD WIDTH=94>
  56.          <P>Print File</P>
  57.       </TD>
  58.       <TD>
  59.          <P>Prints the foremost web page open in CreativePage</P>
  60.       </TD>
  61.    </TR>
  62.    <TR>
  63.       <TD WIDTH=94>
  64.          <P>Paste</P>
  65.       </TD>
  66.       <TD>
  67.          <P>Pastes the contents of the clipboard in the foremost open
  68.          web page</P>
  69.       </TD>
  70.    </TR>
  71.    <TR>
  72.       <TD WIDTH=94>
  73.          <P>Copy</P>
  74.       </TD>
  75.       <TD>
  76.          <P>Cops the text selected in the foremost web page open</P>
  77.       </TD>
  78.    </TR>
  79.    <TR>
  80.       <TD WIDTH=94>
  81.          <P>Make Backup</P>
  82.       </TD>
  83.       <TD>
  84.          <P>Makes a backup of the foremost web page open</P>
  85.       </TD>
  86.    </TR>
  87.    <TR>
  88.       <TD WIDTH=94>
  89.          <P>Optimize HTML</P>
  90.       </TD>
  91.       <TD>
  92.          <P>Optimizes the HTML in the foremost web page open in
  93.          CreativePage</P>
  94.       </TD>
  95.    </TR>
  96.    <TR>
  97.       <TD WIDTH=94>
  98.          <P>Deoptimize HTML</P>
  99.       </TD>
  100.       <TD>
  101.          <P>Deoptimizes the HTML in a web page</P>
  102.       </TD>
  103.    </TR>
  104.    <TR>
  105.       <TD WIDTH=94>
  106.          <P>Save</P>
  107.       </TD>
  108.       <TD>
  109.          <P>Saves the foremost web page</P>
  110.       </TD>
  111.    </TR>
  112.    <TR>
  113.       <TD WIDTH=94>
  114.          <P>Select All</P>
  115.       </TD>
  116.       <TD>
  117.          <P>Selects the entire web page in CreativePage that is
  118.          foremost</P>
  119.       </TD>
  120.    </TR>
  121. </TABLE>
  122. </P>
  123.  
  124. <P><FONT FACE="Arial Black" COLOR="#003300">HOW TO MAKE AN
  125. APPLESCRIPT<BR>
  126. </FONT>All of the above information is useless unless you know how to
  127. make an AppleScript to do this things. To make a script, you must
  128. have AppleScript installed, which is included when you install any
  129. Mac OS version that supports CreativePage.</P>
  130.  
  131. <P>First, open up the AppleScript editor by going into your Apple
  132. Extras folder and searching for the folder AppleScript. The
  133. AppleScript editor is an application where you make, edit and compile
  134. your scripts for any scriptable application, such as
  135. CreativePage.</P>
  136.  
  137. <P>Once the editor is open, your editor will appear for making a
  138. script. Enter in the following code into the editor window:</P>
  139.  
  140. <P><FONT SIZE="-2" FACE="Monaco">tell application "CreativePage
  141. 2.6"<BR>
  142. beep<BR>
  143. end tell</FONT></P>
  144.  
  145. <P>Once you check the code for errors and run it, the code above will
  146. open CreativePage and make it beep. It will beep because one of the
  147. commands above is "beep" and its definition says it will make
  148. CreativePage beep.</P>
  149.  
  150. <P>Now, while keeping line 1 and line 3 of the code above, change the
  151. code in line 2 (beep) with another command above. The following code
  152. will open CreativePage, open a document, paste what's in the
  153. clipboard into the contents of the document opened, print a copy,
  154. then beep when finished.</P>
  155.  
  156. <P><FONT SIZE="-2" FACE="Monaco">tell application "CreativePage
  157. 2.6"<BR>
  158. Open File<BR>
  159. Paste<BR>
  160. Print<BR>
  161. Beep<BR>
  162. end tell</FONT></P>
  163.  
  164. <P>Making an AppleScript for controlling CreativePage is very easy,
  165. as shown above. Now you may want to compile your script so you can
  166. just double click it on your desktop or in a folder and it will do
  167. what you want. To compile a script, enter in the script code (such as
  168. the code above) and go to the File menu in the menu bar and choose
  169. Save As Run Only. Now you can double click your compiled script and
  170. it will do what you entered before compiling in the AppleScript
  171. editor.</P>
  172.  
  173. <P><FONT FACE="Arial Black" COLOR="#003300">EXAMPLES<BR>
  174. </FONT>Inside the CreativePage folder their is another folder named
  175. "Scripts". You may put your scripts you make in there with the
  176. example scripts already placed in there. The example scripts are
  177. simple, and their are only two of them. The one named "Quit" will
  178. make CreativePage quit once it is opened, and the one named "Does a
  179. lot" will do exactly what it says, a lot - and more specifically;
  180. open a document, print it, paste the contents of a clipboard in it,
  181. make a backup copy of it, and quit CreativePage.</P>
  182.  
  183. <P><A NAME=bottom></A><FONT FACE="Arial Black" COLOR="#003300">CONTACT<BR>
  184. </FONT>If you need help creating an AppleScript or need to contact us
  185. for any reason, please send us an email:<BR>
  186. <A HREF="mailto:info@pinehillproducts.com">info@pinehillproducts.com</A></P>
  187.  
  188. <P>Also check out our web site for news, updates, tips, and other
  189. help at:<BR>
  190. <A HREF="http://www.pinehillproducts.com/">http://www.pinehillproducts.com/</A></P>
  191. </BODY>
  192. </HTML>
  193.